<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
session_start();
/*if (!isset($_SESSION['level']) || $_SESSION['level'] == ''){
	echo "<script type='text/javascript'>window.location='../index.php';</script>"; 
}
$level = $_SESSION['level'];*/
if(isset($_REQUEST['id'])){
	$id= $_REQUEST['id'];
	include_once('controller/db.php');
	$db = new DB;
	$result = $db->execute("delete from sanpham where MaSanPham ='".$id."'");
	
	if(!$result)
		echo "<script type='text/javascript'>alert('>>> ( Failed !!! ) <<<'); window.location='sanpham.php';</script>"; 
	echo "<script type='text/javascript'>window.location='sanpham.php';</script>";
	$db->disConnect();
}
?>
